import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/sysdictionary/`

// 数据字典管理
export const getDictionary = (params, config = {}) => {
  return request.get(apiPrefix + 'get', { params: params, ...config })
}
export const getDicList = (params, config = {}) => {
  return request.get(apiPrefix + 'list', { params: params, ...config })
}
export const removeDic = (params, config = {}) => {
  return request.post(apiPrefix + 'delete', params, config)
}
export const editDic = (params, config = {}) => {
  return request.post(apiPrefix + 'update', params, config)
}
export const addDic = (params, config = {}) => {
  return request.post(apiPrefix + 'add', params, config)
}

export const getDic = (params, config = {}) => {
  return request.get(apiPrefix + 'get', { params: params, ...config })
}
